package com.duqc.web.controller;

import com.duqc.response.ResultMsg;
import com.duqc.web.entity.DorisQuery;
import com.duqc.web.service.DorisQueryService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @ClassName DorisQueryController
 * @Description DorisQueryController
 * @Author duqc
 * @Date 2023/2/1
 **/
@Slf4j
@RequiredArgsConstructor
@RestController
@RequestMapping("/doris/query")
public class DorisQueryController {

    private final DorisQueryService dorisQueryService;

    @GetMapping("/list")
    public ResultMsg<List<DorisQuery>> list() {
        return ResultMsg.success(this.dorisQueryService.list());
    }
}
